package com.example.controller;


import com.example.common.result.Result;
import com.example.entity.vo.PurmaVo;
import com.example.mapper.PurmaMapper;
import com.example.service.PurmaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LiangPandeng
 * @since 2024-02-27
 */
@RestController
@RequestMapping("/api/purma")
@Api(tags = "供应商相关接口")
public class PurmaController {
    @Resource
    private PurmaService purmaService;

    @Resource
    private PurmaMapper purmaMapper;

    @ApiOperation("获取供应商信息")
    @GetMapping("/list")
    public Result<List<PurmaVo>> list(){
        List<PurmaVo> list = purmaMapper.selectListPurmaVo();
        return Result.success(list);
    }

}
